// eslint-disable-next-line @typescript-eslint/no-unused-vars
import {createRouter, createWebHistory, createWebHashHistory} from 'vue-router';
import HomeView from '@/views/HomeView/HomeView.vue';
import FileList from '@/views/HomeView/FileList/FileList.vue';
import LoginView from '@/views/LoginView.vue';
import {ROUTE_LOGIN, ROUTE_HOME, ROUTE_FILE_LIST} from '@/router/names';
// import AboutView from '../views/AboutView.vue';

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  // history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: ROUTE_LOGIN,
      component: LoginView
    },
    {
      path: '/home',
      name: ROUTE_HOME,
      component: HomeView,
      redirect: '/home/file-list',
      children: [
        {
          path: '/home/file-list',
          name: ROUTE_FILE_LIST,
          component: FileList
        }
      ]
    }
  ]
});

export default router;
